package com.jiazhong.equals;

import java.util.HashMap;
import java.util.Map;

public class Test2 {
    public static void main(String[] args) {
        Map<User,String> map=new HashMap<>();
        User user1=new User(1,"admin");
//        User user2=new User(2,"xiaoqiang");
        User user3=new User(1,"admin");
        map.put(user1,"user1");
//        map.put(user2,"user2");
//        System.out.println(user1.hashCode());
//        System.out.println(user2.hashCode());
//        System.out.println(map);
        map.put(user3,"user3");
        System.out.println(map);

    }
}
